package com.aiks.dsyncpluginspringbootautoconfigure.plugin;

import cn.hutool.core.util.ReflectUtil;

/**
 * ReflectUtils.
 * 暂时使用hutoolUtil中的ReflectUtil，后续调整.
 *
 * @author <a href="mailto:yuanz@yxt.com">yuanz</a>
 * @date 2022-06-30 15:01
 * @since 1.0.0
 **/
public class ReflectUtils {
    
    public static final ReflectUtils INSTANCE = new ReflectUtils();
    
    /**
     * getFieldValue.
     *
     * @param obj       obj
     * @param fieldName fieldName
     * @return Object
     */
    public Object getFieldValue(final Object obj, final String fieldName) {
        return ReflectUtil.getFieldValue(obj, fieldName);
    }
    
    /**
     * setFieldValue.
     *
     * @param obj       obj
     * @param fieldName fieldName
     * @param value     value
     */
    public void setFieldValue(final Object obj, final String fieldName, final Object value) {
        ReflectUtil.setFieldValue(obj, fieldName, value);
    }
    
}
